<?php
require_once("shop_product.php");
require_once("shop_product_write.php");
require_once("cd_product.php");
require_once("book_product.php");

$cd = new CdProdcut("My CD","Adair","Z",6.88,10);
$cd_length = $cd->getPlayLength();
$cd_summary = $cd->getSummaryLine();

$shop_write = new ShopProductWrite();
$shop_write->write($cd);


var_dump($cd_length ,$cd_summary);

$book = new BookProdcut("My Book","Adair","Z",8.88,100);
$book_pages = $book->getNumberOfPages();
$book_summary = $book->getSummaryLine();

//$book_write = new ShopProductWrite();
$shop_write->write($book);


var_dump($book_pages ,$book_summary);